import React from 'react'
import './App.less'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import Login from './page/login/login.jsx'
import Admin from './page/admin/admin'

class App extends React.Component {
  render () {
    return (
        // 路由器
      <BrowserRouter>
      {/* Switch在某段时间里只匹配一个匹配到就不继续匹配了 ,6.0版本没有他了换成Routes*/}
        <Routes>
            {/* 路由映射关系配置组件component和路径path */}
            <Route path='/login' element={<Login />}></Route>
           <Route path='/admin' element={<Admin />}></Route>
        </Routes>
      </BrowserRouter>
    )
  }
}
export default App
